<?php
/**
 * ProductController.php
 *
 * @copyright   2023 thingsworld.com.cn - All Rights Reserved
 * @link        http://thingsworld.com.cn/
 * @author      stiffer.chen <chenl@thingsworld.com.cn>
 * @created     2023-02-14 01:24:38
 * @modified    2023-02-14 01:24:38
 *
 */

namespace App\Http\Controllers;

use App\Repositories\ProductRepo;
use App\Services\ProductService;

class ProductController extends BaseController
{

    /**
     * 构造函数
     * @author aaron
     * @since 2021/6/9
     * ArticleController constructor.
     */

    public function __construct()
    {
        parent::__construct();
        $this->service = new ProductService();
    }

    /**
     * @OA\Get(
     *     path="/products/params",
     *     tags={"Product"},
     *     summary="获取商品参数列表",
     *     description="获取商品参数列表",
     *     operationId="product_params",
     *     security={{"bearerAuth":{}}},
     *     @OA\Response(response=200, description="请求成功"),
     *     @OA\Response(response=401,description="鉴权失败"),
     *     @OA\Response(response=422, description="请求异常")
     * )
     */
    public function params(Request $request)
    {
        $params = ProductRepo::params();
        return message("获取成功", true, $params);
    }
}
